package com.common.link.model;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Objects;

/**
 * 描述：
 * 实体类型
 * @author xianggj
 * @Date 2022/2/14 17:25
 **/
@Data
@NoArgsConstructor
public class EntityVO implements Serializable {

    private static final long serialVersionUID = -1L;

    private String id;

    private String name;

    private String color;

    private String code;

    public EntityVO(String id, String name, String code) {
        this.id = id;
        this.name = name;
        this.code = code;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        EntityVO entityVO = (EntityVO) o;
        return Objects.equals(id, entityVO.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
